import module from '../../module'

export default name => {
    const root = `${module.code}/${name}/`
    const crud = $http.crud(root)
    //查询当前登录用户票据
    crud.querycurrentuserbill = params => {
        return $http.get('/dispatch/common/querycurrentuserbill', params)
    }
    //启用或禁用当前登录用户票段
    crud.changebillstatus = params => {
        return $http.post('/dispatch/common/changebillstatus', params)
    }
    //修改当前票号
    crud.changecurrentbillnum = params => {
        return $http.post('/dispatch/common/changecurrentbillnum', params)
    }
    return {
        ...crud
    }
}
